# -*- coding:utf-8 -*-
import Tkinter

#from engine import Engine

class PachongWin(object):
    def run(self):
        self.root=Tkinter.Tk()
        self.root.title('twi爬虫控制窗口')
        
        #self.eng=Engine('zhidao')

        #画界面
        self.root.geometry('190x80')
        self.f = Tkinter.Frame(self.root)
        self.b_start=Tkinter.Button(self.f,text='启动',command=self.start)
        self.b_start.config(height=3,width=10)
        self.b_start.pack()
        self.b_stop=Tkinter.Button(self.f,text='退出',state=Tkinter.DISABLED,command=self.stop)
        self.b_stop.config(height=3,width=10)
        self.b_stop.pack()
        self.f.pack()
        
        Tkinter.mainloop()
        
    def start(self):
        #self.eng.start()
        self.b_start.config(state=Tkinter.DISABLED)
        self.b_stop.config(state=Tkinter.ACTIVE)
        
    def stop(self):
        #self.eng.is_running=0
        self.b_start.config(state=Tkinter.ACTIVE)
        self.b_stop.config(state=Tkinter.DISABLED)
        pass
    
if __name__=='__main__':
    win=PachongWin()
    win.run()
    print 'end'








